package com.common.utils;
/**
 * 用于构造地图中的坐标点
 * @author lw
 * **/
public class Point {
     
    private double lat;// 纬度
    private double lng;// 经度
     
    public Point() {
    }
     
    public Point(double lng, double lat) {
        this.lng = lng;
        this.lat = lat;
    }
     
    public double getLat() {
        return lat;
    }
    @Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		long temp;
		temp = Double.doubleToLongBits(lat);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(lng);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Point other = (Point) obj;
		if (Double.doubleToLongBits(lat) != Double.doubleToLongBits(other.lat))
			return false;
		if (Double.doubleToLongBits(lng) != Double.doubleToLongBits(other.lng))
			return false;
		return true;
	}

	public void setLat(double lat) {
        this.lat = lat;
    }
    public double getLng() {
        return lng;
    }
    public void setLng(double lng) {
        this.lng = lng;
    }
     
    @Override
    public String toString() {
        return "Point [lat=" + lat + ", lng=" + lng + "]";
    }
     
}